package com.sunlake.spring.main.model.course.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 课程分页查询参数
 */
@Data
public class CourseQueryDTO {
    /**
     * 关键词
     */
    @Size(max = 60, message = "关键词长度不能超过60个字符")
    private String keyword;

    /**
     * 分类
     */
    @Size(max = 50, message = "分类长度不能超过50个字符")
    private String category;

    /**
     * 难度
     */
    @Size(max = 20, message = "难度长度不能超过20个字符")
    private String difficulty;

    /**
     * 当前页
     */
    @Min(value = 1, message = "页码最少为1")
    private Integer page = 1;

    /**
     * 每页数量
     */
    @Min(value = 1, message = "每页数量最少为1")
    @Max(value = 50, message = "每页数量最多50条")
    private Integer limit = 10;
}
